#include <iostream>
#include <stdlib.h>
#include <vector>

using namespace std;

int main()
{
    vector<int> v1;
    vector<int> v2(10);
    vector<int> v3(10,5);
    vector<int> v4(v3.begin(), v3.end());
    vector<int> v5(v4);
    vector<int>::iterator it;

    for(it=v3.begin();it!=v3.end();it++)
    {
        cout<<*it<<"  ";
    }
    cout<<endl;

    for(it=v4.begin();it!=v4.end();it++)
    {
        cout<<*it<<"  ";
    }
    cout<<endl;

    for(it=v5.begin();it!=v5.end();it++)
    {
        cout<<*it<<"  ";
    }
    cout<<endl;

    for(int i=0;i<5;i++)
    {
      v5.push_back(i);
    }

    for(it=v5.begin();it!=v5.end();it++)
    {
        cout<<*it<<"  ";
    }
    cout<<endl;

      for(int i=0;i<6;i++)
    {
        v5.pop_back();
    }

    for(it=v5.begin();it!=v5.end();it++)
    {
        cout<<*it<<"  ";
    }
    cout<<endl;

    system("pause");
    return 0;
}